package com.ktwlsoft.fundmanage.fundFlow.processHandler.FundOutServiceTask;

import com.ktwlsoft.fundmanage.domain.business.FundInService;
import com.ktwlsoft.fundmanage.domain.entity.FundSuperviseAccept;
import com.ktwlsoft.fundmanage.fundFlow.processHandler.BaseServiceTask;
import com.ktwlsoft.fundmanage.payload.fundOut.TransactRequest;
import org.activiti.engine.delegate.DelegateExecution;
import org.springframework.stereotype.Service;

@Service("transferBalanceCheck")
public class ThirdTransferBalanceCheck extends BaseServiceTask {
    @Override
    public void execute(DelegateExecution execution) {
        TransactRequest request = (TransactRequest) execution.getVariable("transferApply");
        FundSuperviseAccept fundSuperviseAccept = fundInService.findBusinessByTsCode(request.getTsCode());
        if(fundSuperviseAccept.getSuperviseAmount().compareTo(request.getAmount())<0){

        }
    }
}
